package com.dingding.service.core.special.sql;

/**
 * 
 * @ClassName: SpecialDrivingRecordSQL 
 * @Description: 行车记录表SQL类
 * @author YHQ
 * @date 2016年12月8日 上午9:54:12
 * @since V2.5.7
 * 
 */
public class SpecialDrivingRecordSQL {

	/**
	 * @author YHQ
	 * @Description: 获取行车记录
	 */
	public static final String GET_SPECIAL_DRIVING_RECORD = "SELECT sdrId, userId, orderId, longitude, latitude, travelDistance, amount, duration, createTime FROM specialdrivingrecord WHERE userId = ? AND orderId = ? ORDER BY createTime DESC ";
	
	/**
	 * @author YHQ
	 * @Description 获取订单行驶里程、时长以及费用
	 */
	public static final String GET_ORDER_MILEAGE_COST  = "SELECT SUM(sdr.amount) AS amount,SUM(sdr.duration) AS duration,SUM(sdr.travelDistance) AS distance FROM specialdrivingrecord sdr WHERE sdr.orderId = ? AND sdr.userId = ?";
	
}
